<?php
function __autoload($class)
{
    require_once($class . '.php');
}

$markers = array(
    new RegexpMarker("/f.ve/"),
    new MatchMarker("five"),
    new MarkLogicMarker('$input equals "five"')
);

foreach ($markers as $marker) {
    print get_class ($marker) . "\n";
    $question = new TextQuestion("how many beans make five", $marker);
    foreach (array("five", "four") as $response) {
        print "\tresponse: $response ";
        if ($question->mark($response)) {
            print "well done\n";
        } else {
            print "never mind\n";
        }
    }
}
?>